package com.itheima.bos.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itheima.bos.bean.base.Area;
import com.itheima.bos.dao.AreaDao;
import com.itheima.bos.service.AreaService;

@Service
@Transactional
public class AreaServiceImpl implements AreaService {

	@Autowired
	private AreaDao dao;

	@Override
	public void saveAreas(List<Area> list) {
		dao.save(list);
	}

	@Override
	public Page<Area> findPageData(Specification<Area> specification, Pageable pageable) {

		return dao.findAll(specification, pageable);
	}

}
